<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE BangPatterns #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE GHCForeignImportPrim #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE MagicHash #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE UnboxedTuples #-}</span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE UnliftedFFITypes #-}</span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE NegativeLiterals #-}</span><span>
</span><span id="line-10"></span><span class="hs-pragma">{-# LANGUAGE BlockArguments #-}</span><span>
</span><span id="line-11"></span><span class="hs-pragma">{-# LANGUAGE LambdaCase #-}</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-name-shadowing #-}</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-comment">-- | Backend based on the GNU GMP library.</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- This has been adapted from the legacy `integer-gmp` package written by</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- Herbert Valerio Riedel.</span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Num.Backend.GMP</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;MachDeps.h&quot;
</span><span class="hs-cpp">#include &quot;WordSize.h&quot;
</span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html"><span class="hs-identifier">GHC.Num.WordArray</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html"><span class="hs-identifier">GHC.Num.Primitives</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#"><span class="hs-identifier">GHC.Prim</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#"><span class="hs-identifier">GHC.Types</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Magic.html#"><span class="hs-identifier">GHC.Magic</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Magic.html#runRW%23"><span class="hs-identifier">runRW#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html"><span class="hs-identifier">GHC.Num.Integer</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html"><span class="hs-identifier">GHC.Num.BigNat</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html"><span class="hs-identifier">GHC.Num.Natural</span></a></span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="hs-keyword">default</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-comment">----------------------------------------------------------------------------</span><span>
</span><span id="line-36"></span><span class="hs-comment">-- type definitions</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-comment">-- NB: all code assumes GMP_LIMB_BITS == WORD_SIZE_IN_BITS</span><span>
</span><span id="line-39"></span><span class="hs-comment">-- The C99 code in cbits/gmp_wrappers.c will fail to compile if this doesn't hold</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="hs-comment">-- | Type representing a GMP Limb</span><span>
</span><span id="line-42"></span><span class="hs-keyword">type</span><span> </span><span id="GmpLimb"><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb"><span class="hs-identifier hs-var">GmpLimb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-comment">-- actually, 'CULong'</span><span>
</span><span id="line-43"></span><span class="hs-keyword">type</span><span> </span><span id="GmpLimb%23"><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-var">GmpLimb#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span class="hs-comment">-- | Count of 'GmpLimb's, must be positive (unless specified otherwise).</span><span>
</span><span id="line-46"></span><span class="hs-keyword">type</span><span> </span><span id="GmpSize"><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize"><span class="hs-identifier hs-var">GmpSize</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>  </span><span class="hs-comment">-- actually, a 'CLong'</span><span>
</span><span id="line-47"></span><span class="hs-keyword">type</span><span> </span><span id="GmpSize%23"><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-var">GmpSize#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#narrowGmpSize%23"><span class="hs-identifier hs-type">narrowGmpSize#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span class="hs-cpp">
#if SIZEOF_LONG == SIZEOF_HSWORD
</span><span class="hs-identifier">narrowGmpSize#</span><span> </span><span class="hs-identifier">x</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">x</span><span class="hs-cpp">
#elif (SIZEOF_LONG == 4) &amp;&amp; (SIZEOF_HSWORD == 8)
</span><span class="hs-comment">-- On IL32P64 (i.e. Win64), we have to be careful with CLong not being</span><span>
</span><span id="line-54"></span><span class="hs-comment">-- 64bit.  This is mostly an issue on values returned from C functions</span><span>
</span><span id="line-55"></span><span class="hs-comment">-- due to sign-extension.</span><span>
</span><span id="line-56"></span><span id="narrowGmpSize%23"><span class="annot"><span class="annottext">narrowGmpSize# :: Int# -&gt; Int#
</span><a href="GHC.Num.Backend.GMP.html#narrowGmpSize%23"><span class="hs-identifier hs-var hs-var">narrowGmpSize#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#narrow32Int%23"><span class="hs-identifier hs-var">narrow32Int#</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-59"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#narrowCInt%23"><span class="hs-identifier hs-type">narrowCInt#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-60"></span><span id="narrowCInt%23"><span class="annot"><span class="annottext">narrowCInt# :: Int# -&gt; Int#
</span><a href="GHC.Num.Backend.GMP.html#narrowCInt%23"><span class="hs-identifier hs-var hs-var">narrowCInt#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#narrow32Int%23"><span class="hs-identifier hs-var">narrow32Int#</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_compare"><span class="hs-identifier hs-type">bignat_compare</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-63"></span><span id="bignat_compare"><span class="annot"><span class="annottext">bignat_compare :: WordArray# -&gt; WordArray# -&gt; Int#
</span><a href="GHC.Num.Backend.GMP.html#bignat_compare"><span class="hs-identifier hs-var hs-var">bignat_compare</span></a></span></span><span> </span><span id="local-6989586621679033216"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033216"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679033215"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033215"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="GHC.Num.Backend.GMP.html#narrowCInt%23"><span class="hs-identifier hs-var">narrowCInt#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; WordArray# -&gt; Int# -&gt; Int#
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_cmp"><span class="hs-identifier hs-var">c_mpn_cmp</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033216"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033215"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033216"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_add"><span class="hs-identifier hs-type">bignat_add</span></a></span><span>
</span><span id="line-66"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-67"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-68"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-69"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-70"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-71"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_add"><span class="hs-pragma hs-type">bignat_add</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-72"></span><span id="bignat_add"><span class="annot"><span class="annottext">bignat_add :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_add"><span class="hs-identifier hs-var hs-var">bignat_add</span></a></span></span><span> </span><span id="local-6989586621679033211"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033211"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033210"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033210"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033209"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033209"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679033208"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033208"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-73"></span><span>   </span><span class="hs-comment">-- weird GMP requirement: the biggest comes first</span><span>
</span><span id="line-74"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033209"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%23"><span class="hs-operator hs-var">&gt;#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033210"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-75"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Word -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-var">ioWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO Word
forall s.
MutableByteArray# s
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO Word
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_add"><span class="hs-identifier hs-var">c_mpn_add</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033211"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033209"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033209"><span class="hs-identifier hs-var">wb</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033210"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033210"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033208"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-76"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033204"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033204"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033203"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033203"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWriteMostSignificant"><span class="hs-identifier hs-var">mwaWriteMostSignificant</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033211"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033203"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033204"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-79"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Word -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-var">ioWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO Word
forall s.
MutableByteArray# s
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO Word
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_add"><span class="hs-identifier hs-var">c_mpn_add</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033211"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033210"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033210"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033209"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033209"><span class="hs-identifier hs-var">wb</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033208"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-80"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033201"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033201"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033200"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033200"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWriteMostSignificant"><span class="hs-identifier hs-var">mwaWriteMostSignificant</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033211"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033200"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033201"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_add_word"><span class="hs-identifier hs-type">bignat_add_word</span></a></span><span>
</span><span id="line-83"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-84"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-85"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-86"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-87"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-88"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_add_word"><span class="hs-pragma hs-type">bignat_add_word</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-89"></span><span id="bignat_add_word"><span class="annot"><span class="annottext">bignat_add_word :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_add_word"><span class="hs-identifier hs-var hs-var">bignat_add_word</span></a></span></span><span> </span><span id="local-6989586621679033198"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033198"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033197"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033197"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033196"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033196"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679033195"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033195"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-90"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Word -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-var">ioWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
forall s.
MutableByteArray# s -&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_add_1"><span class="hs-identifier hs-var">c_mpn_add_1</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033198"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033197"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033197"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033196"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033195"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-91"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033193"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033193"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033192"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033192"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWriteMostSignificant"><span class="hs-identifier hs-var">mwaWriteMostSignificant</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033198"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033192"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033193"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_sub"><span class="hs-identifier hs-type">bignat_sub</span></a></span><span>
</span><span id="line-94"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-95"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-96"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-97"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-98"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-99"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_sub"><span class="hs-pragma hs-type">bignat_sub</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-100"></span><span id="bignat_sub"><span class="annot"><span class="annottext">bignat_sub :: MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Int# #)
</span><a href="GHC.Num.Backend.GMP.html#bignat_sub"><span class="hs-identifier hs-var hs-var">bignat_sub</span></a></span></span><span> </span><span id="local-6989586621679033189"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033189"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033188"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033188"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033187"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033187"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679033186"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033186"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-101"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Word -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-var">ioWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO Word
forall s.
MutableByteArray# s
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO Word
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_sub"><span class="hs-identifier hs-var">c_mpn_sub</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033189"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033188"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033188"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033187"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033187"><span class="hs-identifier hs-var">wb</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033186"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-102"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033184"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033184"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033184"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-comment">-- underflow</span><span>
</span><span id="line-103"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033183"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033183"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033183"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-comment">-- no underflow</span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_sub_word"><span class="hs-identifier hs-type">bignat_sub_word</span></a></span><span>
</span><span id="line-106"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-107"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-108"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-109"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-110"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-111"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_sub_word"><span class="hs-pragma hs-type">bignat_sub_word</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-112"></span><span id="bignat_sub_word"><span class="annot"><span class="annottext">bignat_sub_word :: MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; Word#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Int# #)
</span><a href="GHC.Num.Backend.GMP.html#bignat_sub_word"><span class="hs-identifier hs-var hs-var">bignat_sub_word</span></a></span></span><span> </span><span id="local-6989586621679033181"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033181"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033180"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033180"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033179"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033179"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679033178"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033178"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-113"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Word -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-var">ioWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
forall s.
MutableByteArray# s -&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_sub_1"><span class="hs-identifier hs-var">c_mpn_sub_1</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033181"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033180"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033180"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033179"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033178"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-114"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033176"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033176"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033176"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-comment">-- underflow</span><span>
</span><span id="line-115"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033175"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033175"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033175"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-comment">-- no underflow</span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_mul"><span class="hs-identifier hs-type">bignat_mul</span></a></span><span>
</span><span id="line-118"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-119"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-120"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-121"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-122"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-123"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_mul"><span class="hs-pragma hs-type">bignat_mul</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-124"></span><span id="bignat_mul"><span class="annot"><span class="annottext">bignat_mul :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_mul"><span class="hs-identifier hs-var hs-var">bignat_mul</span></a></span></span><span> </span><span id="local-6989586621679033173"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033173"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033172"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033172"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033171"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033171"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679033170"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033170"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-125"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Word -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-var">ioWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO Word
forall s.
MutableByteArray# s
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO Word
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_mul"><span class="hs-identifier hs-var">c_mpn_mul</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033173"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033172"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033172"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033171"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033171"><span class="hs-identifier hs-var">wb</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033170"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-126"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033168"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033168"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033167"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033167"><span class="hs-identifier hs-var">_msl</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033168"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="hs-comment">-- we don't care about the most-significant</span><span>
</span><span id="line-127"></span><span>                           </span><span class="hs-comment">-- limb. The caller shrink the mwa if</span><span>
</span><span id="line-128"></span><span>                           </span><span class="hs-comment">-- necessary anyway.</span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_mul_word"><span class="hs-identifier hs-type">bignat_mul_word</span></a></span><span>
</span><span id="line-131"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-132"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-133"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-134"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-135"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-136"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_mul_word"><span class="hs-pragma hs-type">bignat_mul_word</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-137"></span><span id="bignat_mul_word"><span class="annot"><span class="annottext">bignat_mul_word :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_mul_word"><span class="hs-identifier hs-var hs-var">bignat_mul_word</span></a></span></span><span> </span><span id="local-6989586621679033165"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033165"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033164"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033164"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033163"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033163"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679033162"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033162"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-138"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Word -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-var">ioWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
forall s.
MutableByteArray# s -&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_mul_1"><span class="hs-identifier hs-var">c_mpn_mul_1</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033165"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033164"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033164"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033163"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033162"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-139"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033160"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033160"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033159"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033159"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableWordArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaWriteMostSignificant"><span class="hs-identifier hs-var">mwaWriteMostSignificant</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033165"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033159"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033160"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_popcount"><span class="hs-identifier hs-type">bignat_popcount</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-142"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_popcount"><span class="hs-pragma hs-type">bignat_popcount</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-143"></span><span id="bignat_popcount"><span class="annot"><span class="annottext">bignat_popcount :: WordArray# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_popcount"><span class="hs-identifier hs-var hs-var">bignat_popcount</span></a></span></span><span> </span><span id="local-6989586621679033157"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033157"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_popcount"><span class="hs-identifier hs-var">c_mpn_popcount</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033157"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033157"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_shiftl"><span class="hs-identifier hs-type">bignat_shiftl</span></a></span><span>
</span><span id="line-147"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-148"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-149"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-150"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-151"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-152"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_shiftl"><span class="hs-pragma hs-type">bignat_shiftl</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-153"></span><span id="bignat_shiftl"><span class="annot"><span class="annottext">bignat_shiftl :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_shiftl"><span class="hs-identifier hs-var hs-var">bignat_shiftl</span></a></span></span><span> </span><span id="local-6989586621679033154"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033154"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033153"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033153"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033152"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033152"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679033151"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033151"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-154"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Word -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-var">ioWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
forall s.
MutableByteArray# s -&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_lshift"><span class="hs-identifier hs-var">c_mpn_lshift</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033154"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033153"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033153"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033152"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033151"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-155"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033149"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033149"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033148"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033148"><span class="hs-identifier hs-var">_msl</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033149"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="hs-comment">-- we don't care about the most-significant</span><span>
</span><span id="line-156"></span><span>                           </span><span class="hs-comment">-- limb. The caller shrink the mwa if</span><span>
</span><span id="line-157"></span><span>                           </span><span class="hs-comment">-- necessary anyway.</span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_shiftr"><span class="hs-identifier hs-type">bignat_shiftr</span></a></span><span>
</span><span id="line-160"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-161"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-162"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-163"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-164"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-165"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_shiftr"><span class="hs-pragma hs-type">bignat_shiftr</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-166"></span><span id="bignat_shiftr"><span class="annot"><span class="annottext">bignat_shiftr :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_shiftr"><span class="hs-identifier hs-var hs-var">bignat_shiftr</span></a></span></span><span> </span><span id="local-6989586621679033146"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033146"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033145"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033145"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033144"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033144"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679033143"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033143"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-167"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Word -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-var">ioWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
forall s.
MutableByteArray# s -&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_rshift"><span class="hs-identifier hs-var">c_mpn_rshift</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033146"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033145"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033145"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033144"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033143"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-168"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033141"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033141"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033140"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033140"><span class="hs-identifier hs-var">_msl</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033141"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="hs-comment">-- we don't care about the most-significant</span><span>
</span><span id="line-169"></span><span>                           </span><span class="hs-comment">-- limb. The caller shrink the mwa if</span><span>
</span><span id="line-170"></span><span>                           </span><span class="hs-comment">-- necessary anyway.</span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_or"><span class="hs-identifier hs-type">bignat_or</span></a></span><span>
</span><span id="line-173"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-174"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-175"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-176"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-177"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-178"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_or"><span class="hs-pragma hs-type">bignat_or</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-179"></span><span id="bignat_or"><span class="annot"><span class="annottext">bignat_or :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_or"><span class="hs-identifier hs-var hs-var">bignat_or</span></a></span></span><span> </span><span id="local-6989586621679033138"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033138"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033137"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033137"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033136"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033136"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679033135"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033135"><span class="hs-identifier hs-var">s1</span></a></span></span><span>
</span><span id="line-180"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033134"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033133"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679033132"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033137"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033134"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033136"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033133"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033135"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-181"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679033132"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033136"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033133"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033137"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033134"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033135"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-182"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-183"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033134"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679033134"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033137"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-184"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033133"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679033133"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033136"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-185"></span><span>      </span><span class="hs-comment">-- nx &gt;= ny</span><span>
</span><span id="line-186"></span><span>      </span><span id="local-6989586621679033132"><span class="annot"><span class="annottext">go :: WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679033132"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033131"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033131"><span class="hs-identifier hs-var">wx</span></a></span></span><span> </span><span id="local-6989586621679033130"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033130"><span class="hs-identifier hs-var">nx</span></a></span></span><span> </span><span id="local-6989586621679033129"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033129"><span class="hs-identifier hs-var">wy</span></a></span></span><span> </span><span id="local-6989586621679033128"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033128"><span class="hs-identifier hs-var">ny</span></a></span></span><span> </span><span id="local-6989586621679033127"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033127"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; State# RealWorld -&gt; State# RealWorld
forall a. IO a -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier hs-var">ioVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; Int# -&gt; IO ()
forall s.
MutableByteArray# s -&gt; WordArray# -&gt; WordArray# -&gt; Int# -&gt; IO ()
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_ior_n"><span class="hs-identifier hs-var">c_mpn_ior_n</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033138"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033131"><span class="hs-identifier hs-var">wx</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033129"><span class="hs-identifier hs-var">wy</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033128"><span class="hs-identifier hs-var">ny</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033127"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-187"></span><span>         </span><span id="local-6989586621679033124"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033124"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033138"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033128"><span class="hs-identifier hs-var">ny</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033131"><span class="hs-identifier hs-var">wx</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033128"><span class="hs-identifier hs-var">ny</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033130"><span class="hs-identifier hs-var">nx</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033128"><span class="hs-identifier hs-var">ny</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033124"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_xor"><span class="hs-identifier hs-type">bignat_xor</span></a></span><span>
</span><span id="line-190"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-191"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-192"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-193"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-194"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-195"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_xor"><span class="hs-pragma hs-type">bignat_xor</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-196"></span><span id="bignat_xor"><span class="annot"><span class="annottext">bignat_xor :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_xor"><span class="hs-identifier hs-var hs-var">bignat_xor</span></a></span></span><span> </span><span id="local-6989586621679033121"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033121"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033120"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033120"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033119"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033119"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679033118"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033118"><span class="hs-identifier hs-var">s1</span></a></span></span><span>
</span><span id="line-197"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033117"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033116"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679033115"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033120"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033117"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033119"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033116"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033118"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-198"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679033115"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033119"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033116"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033120"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033117"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033118"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-199"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-200"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033117"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679033117"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033120"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-201"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033116"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679033116"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033119"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-202"></span><span>      </span><span class="hs-comment">-- nx &gt;= ny</span><span>
</span><span id="line-203"></span><span>      </span><span id="local-6989586621679033115"><span class="annot"><span class="annottext">go :: WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="#local-6989586621679033115"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679033114"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033114"><span class="hs-identifier hs-var">wx</span></a></span></span><span> </span><span id="local-6989586621679033113"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033113"><span class="hs-identifier hs-var">nx</span></a></span></span><span> </span><span id="local-6989586621679033112"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033112"><span class="hs-identifier hs-var">wy</span></a></span></span><span> </span><span id="local-6989586621679033111"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033111"><span class="hs-identifier hs-var">ny</span></a></span></span><span> </span><span id="local-6989586621679033110"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033110"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; State# RealWorld -&gt; State# RealWorld
forall a. IO a -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier hs-var">ioVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; Int# -&gt; IO ()
forall s.
MutableByteArray# s -&gt; WordArray# -&gt; WordArray# -&gt; Int# -&gt; IO ()
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_xor_n"><span class="hs-identifier hs-var">c_mpn_xor_n</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033121"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033114"><span class="hs-identifier hs-var">wx</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033112"><span class="hs-identifier hs-var">wy</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033111"><span class="hs-identifier hs-var">ny</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033110"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-204"></span><span>         </span><span id="local-6989586621679033108"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033108"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033121"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033111"><span class="hs-identifier hs-var">ny</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033114"><span class="hs-identifier hs-var">wx</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033111"><span class="hs-identifier hs-var">ny</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033113"><span class="hs-identifier hs-var">nx</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033111"><span class="hs-identifier hs-var">ny</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033108"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-205"></span><span>
</span><span id="line-206"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_and"><span class="hs-identifier hs-type">bignat_and</span></a></span><span>
</span><span id="line-207"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-208"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-209"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-210"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-211"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-212"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_and"><span class="hs-pragma hs-type">bignat_and</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-213"></span><span id="bignat_and"><span class="annot"><span class="annottext">bignat_and :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_and"><span class="hs-identifier hs-var hs-var">bignat_and</span></a></span></span><span> </span><span id="local-6989586621679033106"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033106"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033105"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033105"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033104"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033104"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679033103"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033103"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; State# RealWorld -&gt; State# RealWorld
forall a. IO a -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier hs-var">ioVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; Int# -&gt; IO ()
forall s.
MutableByteArray# s -&gt; WordArray# -&gt; WordArray# -&gt; Int# -&gt; IO ()
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_and_n"><span class="hs-identifier hs-var">c_mpn_and_n</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033106"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033105"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033104"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033101"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033103"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-214"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-215"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033100"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679033100"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033105"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-216"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033099"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679033099"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033104"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-217"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033101"><span class="annot"><span class="annottext">sz :: Int#
</span><a href="#local-6989586621679033101"><span class="hs-identifier hs-var hs-var">sz</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="GHC.Num.Primitives.html#minI%23"><span class="hs-identifier hs-var">minI#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033100"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033099"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_and_not"><span class="hs-identifier hs-type">bignat_and_not</span></a></span><span>
</span><span id="line-220"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-221"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-222"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-223"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-224"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-225"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_and_not"><span class="hs-pragma hs-type">bignat_and_not</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-226"></span><span id="bignat_and_not"><span class="annot"><span class="annottext">bignat_and_not :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_and_not"><span class="hs-identifier hs-var hs-var">bignat_and_not</span></a></span></span><span> </span><span id="local-6989586621679033096"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033096"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033095"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033095"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033094"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033094"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679033093"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033093"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-227"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; State# RealWorld -&gt; State# RealWorld
forall a. IO a -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier hs-var">ioVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; Int# -&gt; IO ()
forall s.
MutableByteArray# s -&gt; WordArray# -&gt; WordArray# -&gt; Int# -&gt; IO ()
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_andn_n"><span class="hs-identifier hs-var">c_mpn_andn_n</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033096"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033095"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033094"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033091"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033093"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-228"></span><span>      </span><span id="local-6989586621679033090"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033090"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; Int#
-&gt; State# RealWorld
-&gt; State# RealWorld
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaArrayCopy%23"><span class="hs-identifier hs-var">mwaArrayCopy#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033096"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033089"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033095"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033089"><span class="hs-identifier hs-var">szB</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033088"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033089"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033090"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-229"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-230"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033088"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679033088"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033095"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-231"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033089"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679033089"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033094"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-232"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679033091"><span class="annot"><span class="annottext">n :: Int#
</span><a href="#local-6989586621679033091"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="GHC.Num.Primitives.html#minI%23"><span class="hs-identifier hs-var">minI#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033088"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033089"><span class="hs-identifier hs-var">szB</span></a></span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_quotrem"><span class="hs-identifier hs-type">bignat_quotrem</span></a></span><span>
</span><span id="line-235"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-236"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-237"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-238"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-239"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-240"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-241"></span><span id="bignat_quotrem"><span class="annot"><span class="annottext">bignat_quotrem :: MutableWordArray# RealWorld
-&gt; MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_quotrem"><span class="hs-identifier hs-var hs-var">bignat_quotrem</span></a></span></span><span> </span><span id="local-6989586621679033086"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033086"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679033085"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033085"><span class="hs-identifier hs-var">mwr</span></a></span></span><span> </span><span id="local-6989586621679033084"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033084"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033083"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033083"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679033082"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033082"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-242"></span><span>   </span><span class="annot"><span class="annottext">IO () -&gt; State# RealWorld -&gt; State# RealWorld
forall a. IO a -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier hs-var">ioVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; IO ()
forall s.
MutableByteArray# s
-&gt; MutableByteArray# s
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; IO ()
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_tdiv_qr"><span class="hs-identifier hs-var">c_mpn_tdiv_qr</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033086"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033085"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033084"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033080"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033083"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033079"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033082"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-243"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-244"></span><span>      </span><span id="local-6989586621679033080"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679033080"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033084"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-245"></span><span>      </span><span id="local-6989586621679033079"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679033079"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033083"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-246"></span><span>
</span><span id="line-247"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_quot"><span class="hs-identifier hs-type">bignat_quot</span></a></span><span>
</span><span id="line-248"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-249"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-250"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-251"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-252"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-253"></span><span id="bignat_quot"><span class="annot"><span class="annottext">bignat_quot :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_quot"><span class="hs-identifier hs-var hs-var">bignat_quot</span></a></span></span><span> </span><span id="local-6989586621679033077"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033077"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679033076"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033076"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033075"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033075"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679033074"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033074"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-254"></span><span>   </span><span class="annot"><span class="annottext">IO () -&gt; State# RealWorld -&gt; State# RealWorld
forall a. IO a -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier hs-var">ioVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO ()
forall s.
MutableByteArray# s
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO ()
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_tdiv_q"><span class="hs-identifier hs-var">c_mpn_tdiv_q</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033077"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033076"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033072"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033075"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033071"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033074"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-255"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-256"></span><span>      </span><span id="local-6989586621679033072"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679033072"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033076"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-257"></span><span>      </span><span id="local-6989586621679033071"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679033071"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033075"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_rem"><span class="hs-identifier hs-type">bignat_rem</span></a></span><span>
</span><span id="line-260"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-261"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-262"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-263"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-264"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-265"></span><span id="bignat_rem"><span class="annot"><span class="annottext">bignat_rem :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_rem"><span class="hs-identifier hs-var hs-var">bignat_rem</span></a></span></span><span> </span><span id="local-6989586621679033069"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033069"><span class="hs-identifier hs-var">mwr</span></a></span></span><span> </span><span id="local-6989586621679033068"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033068"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033067"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033067"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679033066"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033066"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-266"></span><span>   </span><span class="annot"><span class="annottext">IO () -&gt; State# RealWorld -&gt; State# RealWorld
forall a. IO a -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier hs-var">ioVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO ()
forall s.
MutableByteArray# s
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO ()
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_tdiv_r"><span class="hs-identifier hs-var">c_mpn_tdiv_r</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033069"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033068"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033064"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033067"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033063"><span class="hs-identifier hs-var">szB</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033066"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-267"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-268"></span><span>      </span><span id="local-6989586621679033064"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679033064"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033068"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-269"></span><span>      </span><span id="local-6989586621679033063"><span class="annot"><span class="annottext">szB :: Int#
</span><a href="#local-6989586621679033063"><span class="hs-identifier hs-var hs-var">szB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033067"><span class="hs-identifier hs-var">wb</span></a></span><span>
</span><span id="line-270"></span><span>
</span><span id="line-271"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_quotrem_word"><span class="hs-identifier hs-type">bignat_quotrem_word</span></a></span><span>
</span><span id="line-272"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Quotient</span><span>
</span><span id="line-273"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-274"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-275"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-276"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-277"></span><span id="bignat_quotrem_word"><span class="annot"><span class="annottext">bignat_quotrem_word :: MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; Word#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Backend.GMP.html#bignat_quotrem_word"><span class="hs-identifier hs-var hs-var">bignat_quotrem_word</span></a></span></span><span> </span><span id="local-6989586621679033061"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033061"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679033060"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033060"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033059"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033059"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679033058"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033058"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-278"></span><span>   </span><span class="annot"><span class="annottext">IO Word -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-var">ioWord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
forall s.
MutableByteArray# s
-&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_divrem_1"><span class="hs-identifier hs-var">c_mpn_divrem_1</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033061"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033060"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033056"><span class="hs-identifier hs-var">szA</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033059"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033058"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-279"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-280"></span><span>      </span><span id="local-6989586621679033056"><span class="annot"><span class="annottext">szA :: Int#
</span><a href="#local-6989586621679033056"><span class="hs-identifier hs-var hs-var">szA</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033060"><span class="hs-identifier hs-var">wa</span></a></span><span>
</span><span id="line-281"></span><span>
</span><span id="line-282"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_quot_word"><span class="hs-identifier hs-type">bignat_quot_word</span></a></span><span>
</span><span id="line-283"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-comment">-- ^ Quotient</span><span>
</span><span id="line-284"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-285"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-286"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-287"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-288"></span><span id="bignat_quot_word"><span class="annot"><span class="annottext">bignat_quot_word :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_quot_word"><span class="hs-identifier hs-var hs-var">bignat_quot_word</span></a></span></span><span> </span><span id="local-6989586621679033054"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033054"><span class="hs-identifier hs-var">mwq</span></a></span></span><span> </span><span id="local-6989586621679033053"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033053"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033052"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033052"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679033051"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033051"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-289"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; Word#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Backend.GMP.html#bignat_quotrem_word"><span class="hs-identifier hs-var">bignat_quotrem_word</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033054"><span class="hs-identifier hs-var">mwq</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033053"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033052"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033051"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-290"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033050"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033050"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033050"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-291"></span><span>
</span><span id="line-292"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_rem_word"><span class="hs-identifier hs-type">bignat_rem_word</span></a></span><span>
</span><span id="line-293"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-294"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-295"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-296"></span><span id="bignat_rem_word"><span class="annot"><span class="annottext">bignat_rem_word :: WordArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_rem_word"><span class="hs-identifier hs-var hs-var">bignat_rem_word</span></a></span></span><span> </span><span id="local-6989586621679033048"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033048"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033047"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033047"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-297"></span><span>   </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_mod_1"><span class="hs-identifier hs-var">c_mpn_mod_1</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033048"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033048"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033047"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-298"></span><span>
</span><span id="line-299"></span><span>
</span><span id="line-300"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_gcd"><span class="hs-identifier hs-type">bignat_gcd</span></a></span><span>
</span><span id="line-301"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-302"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-303"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-304"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-305"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-306"></span><span id="bignat_gcd"><span class="annot"><span class="annottext">bignat_gcd :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_gcd"><span class="hs-identifier hs-var hs-var">bignat_gcd</span></a></span></span><span> </span><span id="local-6989586621679033044"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033044"><span class="hs-identifier hs-var">mwr</span></a></span></span><span> </span><span id="local-6989586621679033043"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033043"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033042"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033042"><span class="hs-identifier hs-var">wb</span></a></span></span><span> </span><span id="local-6989586621679033041"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033041"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-307"></span><span>   </span><span class="hs-comment">-- wa &gt; wb</span><span>
</span><span id="line-308"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Int -&gt; State# RealWorld -&gt; (# State# RealWorld, Int# #)
</span><a href="GHC.Num.Primitives.html#ioInt%23"><span class="hs-identifier hs-var">ioInt#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO Int
forall s.
MutableByteArray# s
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO Int
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_gcd%23"><span class="hs-identifier hs-var">c_mpn_gcd#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033044"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033043"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033043"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033042"><span class="hs-identifier hs-var">wb</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033042"><span class="hs-identifier hs-var">wb</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033041"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-309"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679033038"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033038"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679033037"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033037"><span class="hs-identifier hs-var">sz</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableByteArray# s -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaSetSize%23"><span class="hs-identifier hs-var">mwaSetSize#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033044"><span class="hs-identifier hs-var">mwr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="GHC.Num.Backend.GMP.html#narrowGmpSize%23"><span class="hs-identifier hs-var">narrowGmpSize#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033037"><span class="hs-identifier hs-var">sz</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033038"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-310"></span><span>
</span><span id="line-311"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_gcd_word"><span class="hs-identifier hs-type">bignat_gcd_word</span></a></span><span>
</span><span id="line-312"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-313"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-314"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-315"></span><span id="bignat_gcd_word"><span class="annot"><span class="annottext">bignat_gcd_word :: WordArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_gcd_word"><span class="hs-identifier hs-var hs-var">bignat_gcd_word</span></a></span></span><span> </span><span id="local-6989586621679033034"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033034"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033033"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033033"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_gcd_1%23"><span class="hs-identifier hs-var">c_mpn_gcd_1#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033034"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033034"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033033"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_gcd_word_word"><span class="hs-identifier hs-type">bignat_gcd_word_word</span></a></span><span>
</span><span id="line-318"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-319"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-320"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-321"></span><span id="bignat_gcd_word_word"><span class="annot"><span class="annottext">bignat_gcd_word_word :: Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_gcd_word_word"><span class="hs-identifier hs-var hs-var">bignat_gcd_word_word</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#integer_gmp_gcd_word"><span class="hs-identifier hs-var">integer_gmp_gcd_word</span></a></span><span>
</span><span id="line-322"></span><span>
</span><span id="line-323"></span><span>
</span><span id="line-324"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_encode_double"><span class="hs-identifier hs-type">bignat_encode_double</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Double%23"><span class="hs-identifier hs-type">Double#</span></a></span><span>
</span><span id="line-325"></span><span id="bignat_encode_double"><span class="annot"><span class="annottext">bignat_encode_double :: WordArray# -&gt; Int# -&gt; Double#
</span><a href="GHC.Num.Backend.GMP.html#bignat_encode_double"><span class="hs-identifier hs-var hs-var">bignat_encode_double</span></a></span></span><span> </span><span id="local-6989586621679033028"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033028"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033027"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033027"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; Int# -&gt; Double#
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_get_d"><span class="hs-identifier hs-var">c_mpn_get_d</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033028"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033028"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679033027"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-326"></span><span>
</span><span id="line-327"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_shiftr_neg"><span class="hs-identifier hs-type">bignat_shiftr_neg</span></a></span><span>
</span><span id="line-328"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-329"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-330"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-331"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-332"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-333"></span><span id="bignat_shiftr_neg"><span class="annot"><span class="annottext">bignat_shiftr_neg :: MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Word# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_shiftr_neg"><span class="hs-identifier hs-var hs-var">bignat_shiftr_neg</span></a></span></span><span> </span><span id="local-6989586621679033024"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033024"><span class="hs-identifier hs-var">mwa</span></a></span></span><span> </span><span id="local-6989586621679033023"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033023"><span class="hs-identifier hs-var">wa</span></a></span></span><span> </span><span id="local-6989586621679033022"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033022"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679033021"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033021"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-334"></span><span>   </span><span class="annot"><span class="annottext">IO Word -&gt; State# RealWorld -&gt; State# RealWorld
forall a. IO a -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier hs-var">ioVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
forall s.
MutableByteArray# s -&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; IO Word
</span><a href="GHC.Num.Backend.GMP.html#c_mpn_rshift_2c"><span class="hs-identifier hs-var">c_mpn_rshift_2c</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033024"><span class="hs-identifier hs-var">mwa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033023"><span class="hs-identifier hs-var">wa</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033023"><span class="hs-identifier hs-var">wa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033022"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033021"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_powmod_word"><span class="hs-identifier hs-type">bignat_powmod_word</span></a></span><span>
</span><span id="line-337"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-338"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-339"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-340"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-341"></span><span id="bignat_powmod_word"><span class="annot"><span class="annottext">bignat_powmod_word :: WordArray# -&gt; WordArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_powmod_word"><span class="hs-identifier hs-var hs-var">bignat_powmod_word</span></a></span></span><span> </span><span id="local-6989586621679033018"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033018"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679033017"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033017"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679033016"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033016"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-342"></span><span>   </span><span class="annot"><span class="annottext">WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#integer_gmp_powm1%23"><span class="hs-identifier hs-var">integer_gmp_powm1#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033018"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033018"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033017"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033017"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679033016"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-343"></span><span>
</span><span id="line-344"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_powmod_words"><span class="hs-identifier hs-type">bignat_powmod_words</span></a></span><span>
</span><span id="line-345"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-346"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-347"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-348"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-349"></span><span id="bignat_powmod_words"><span class="annot"><span class="annottext">bignat_powmod_words :: Word# -&gt; Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#bignat_powmod_words"><span class="hs-identifier hs-var hs-var">bignat_powmod_words</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Backend.GMP.html#integer_gmp_powm_word"><span class="hs-identifier hs-var">integer_gmp_powm_word</span></a></span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#bignat_powmod"><span class="hs-identifier hs-type">bignat_powmod</span></a></span><span>
</span><span id="line-352"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-353"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-354"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-355"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-356"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-357"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-358"></span><span id="bignat_powmod"><span class="annot"><span class="annottext">bignat_powmod :: MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#bignat_powmod"><span class="hs-identifier hs-var hs-var">bignat_powmod</span></a></span></span><span> </span><span id="local-6989586621679033011"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033011"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679033010"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033010"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679033009"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033009"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679033008"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033008"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679033007"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033007"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#sbignat_powmod"><span class="hs-identifier hs-var">sbignat_powmod</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679033011"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033010"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033010"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033009"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679033008"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679033007"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#integer_powmod"><span class="hs-identifier hs-type">integer_powmod</span></a></span><span>
</span><span id="line-361"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-362"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html#Natural"><span class="hs-identifier hs-type">Natural</span></a></span><span>
</span><span id="line-363"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html#Natural"><span class="hs-identifier hs-type">Natural</span></a></span><span>
</span><span id="line-364"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html#Natural"><span class="hs-identifier hs-type">Natural</span></a></span><span>
</span><span id="line-365"></span><span id="integer_powmod"><span class="annot"><span class="annottext">integer_powmod :: Integer -&gt; Natural -&gt; Natural -&gt; Natural
</span><a href="GHC.Num.Backend.GMP.html#integer_powmod"><span class="hs-identifier hs-var hs-var">integer_powmod</span></a></span></span><span> </span><span id="local-6989586621679033004"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679033004"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679033003"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679033003"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679033002"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679033002"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalFromBigNat%23"><span class="hs-identifier hs-var">naturalFromBigNat#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; WordArray#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032999"><span class="hs-identifier hs-var">szm</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679032998"><span class="hs-identifier hs-var">io</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-366"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-367"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032997"><span class="annot"><span class="annottext">be :: WordArray#
</span><a href="#local-6989586621679032997"><span class="hs-identifier hs-var hs-var">be</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; WordArray#
</span><a href="GHC.Num.Natural.html#naturalToBigNat%23"><span class="hs-identifier hs-var">naturalToBigNat#</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679033003"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-368"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032995"><span class="annot"><span class="annottext">bm :: WordArray#
</span><a href="#local-6989586621679032995"><span class="hs-identifier hs-var hs-var">bm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; WordArray#
</span><a href="GHC.Num.Natural.html#naturalToBigNat%23"><span class="hs-identifier hs-var">naturalToBigNat#</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679033002"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-369"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032994"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032994"><span class="hs-identifier hs-var">sb</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032993"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032993"><span class="hs-identifier hs-var">bb</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; (# Int#, WordArray# #)
</span><a href="GHC.Num.Integer.html#integerToBigNatSign%23"><span class="hs-identifier hs-var">integerToBigNatSign#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679033004"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-370"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032991"><span class="annot"><span class="annottext">szb :: Int#
</span><a href="#local-6989586621679032991"><span class="hs-identifier hs-var hs-var">szb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032993"><span class="hs-identifier hs-var">bb</span></a></span><span>
</span><span id="line-371"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032999"><span class="annot"><span class="annottext">szm :: Int#
</span><a href="#local-6989586621679032999"><span class="hs-identifier hs-var hs-var">szm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032995"><span class="hs-identifier hs-var">bm</span></a></span><span>
</span><span id="line-372"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032989"><span class="annot"><span class="annottext">ssb :: Int#
</span><a href="#local-6989586621679032989"><span class="hs-identifier hs-var hs-var">ssb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032994"><span class="hs-identifier hs-var">sb</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-comment">-- signed size of b</span><span>
</span><span id="line-373"></span><span>               </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032991"><span class="hs-identifier hs-var">szb</span></a></span><span>
</span><span id="line-374"></span><span>               </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateInt%23"><span class="hs-identifier hs-var">negateInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032991"><span class="hs-identifier hs-var">szb</span></a></span><span>
</span><span id="line-375"></span><span>
</span><span id="line-376"></span><span>      </span><span id="local-6989586621679032998"><span class="annot"><span class="annottext">io :: MutableWordArray# RealWorld -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679032998"><span class="hs-identifier hs-var hs-var">io</span></a></span></span><span> </span><span id="local-6989586621679032988"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032988"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679032987"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032987"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#sbignat_powmod"><span class="hs-identifier hs-var">sbignat_powmod</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032988"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032989"><span class="hs-identifier hs-var">ssb</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032993"><span class="hs-identifier hs-var">bb</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032997"><span class="hs-identifier hs-var">be</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032995"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032987"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-377"></span><span>
</span><span id="line-378"></span><span>
</span><span id="line-379"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#sbignat_powmod"><span class="hs-identifier hs-type">sbignat_powmod</span></a></span><span>
</span><span id="line-380"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#MutableWordArray%23"><span class="hs-identifier hs-type">MutableWordArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-381"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-382"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-383"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-384"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.WordArray.html#WordArray%23"><span class="hs-identifier hs-type">WordArray#</span></a></span><span>
</span><span id="line-385"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-386"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-387"></span><span id="sbignat_powmod"><span class="annot"><span class="annottext">sbignat_powmod :: MutableWordArray# RealWorld
-&gt; Int#
-&gt; WordArray#
-&gt; WordArray#
-&gt; WordArray#
-&gt; State# RealWorld
-&gt; State# RealWorld
</span><a href="GHC.Num.Backend.GMP.html#sbignat_powmod"><span class="hs-identifier hs-var hs-var">sbignat_powmod</span></a></span></span><span> </span><span id="local-6989586621679032986"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032986"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679032985"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032985"><span class="hs-identifier hs-var">b_signed_size</span></a></span></span><span> </span><span id="local-6989586621679032984"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032984"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679032983"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032983"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679032982"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032982"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679032981"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032981"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-388"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Int -&gt; State# RealWorld -&gt; (# State# RealWorld, Int# #)
</span><a href="GHC.Num.Primitives.html#ioInt%23"><span class="hs-identifier hs-var">ioInt#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; IO Int
</span><a href="GHC.Num.Backend.GMP.html#integer_gmp_powm%23"><span class="hs-identifier hs-var">integer_gmp_powm#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032986"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032984"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032985"><span class="hs-identifier hs-var">b_signed_size</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032983"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032983"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032982"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.WordArray.html#wordArraySize%23"><span class="hs-identifier hs-var">wordArraySize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032982"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032981"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-389"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032979"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032979"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032978"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032978"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableByteArray# s -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaSetSize%23"><span class="hs-identifier hs-var">mwaSetSize#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032986"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="GHC.Num.Backend.GMP.html#narrowGmpSize%23"><span class="hs-identifier hs-var">narrowGmpSize#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032978"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032979"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-390"></span><span>
</span><span id="line-391"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#integer_gcde"><span class="hs-identifier hs-type">integer_gcde</span></a></span><span>
</span><span id="line-392"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-393"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-394"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-395"></span><span id="integer_gcde"><span class="annot"><span class="annottext">integer_gcde :: Integer -&gt; Integer -&gt; (# Integer, Integer, Integer #)
</span><a href="GHC.Num.Backend.GMP.html#integer_gcde"><span class="hs-identifier hs-var hs-var">integer_gcde</span></a></span></span><span> </span><span id="local-6989586621679032976"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679032976"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679032975"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679032975"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(State# RealWorld
 -&gt; (# State# RealWorld, (# Integer, Integer, Integer #) #))
-&gt; (# State# RealWorld, (# Integer, Integer, Integer #) #)
forall o. (State# RealWorld -&gt; o) -&gt; o
</span><a href="../../ghc-prim/src/GHC.Magic.html#runRW%23"><span class="hs-identifier hs-var">runRW#</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
-&gt; (# State# RealWorld, (# Integer, Integer, Integer #) #)
</span><a href="#local-6989586621679032974"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032973"><span class="annot"><span class="annottext">(# Integer, Integer, Integer #)
</span><a href="#local-6989586621679032973"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(# Integer, Integer, Integer #)
</span><a href="#local-6989586621679032973"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-396"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-397"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032972"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032972"><span class="hs-identifier hs-var">sa</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032971"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032971"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; (# Int#, WordArray# #)
</span><a href="GHC.Num.Integer.html#integerToBigNatSign%23"><span class="hs-identifier hs-var">integerToBigNatSign#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679032976"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-398"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032970"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032970"><span class="hs-identifier hs-var">sb</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032969"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032969"><span class="hs-identifier hs-var">bb</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; (# Int#, WordArray# #)
</span><a href="GHC.Num.Integer.html#integerToBigNatSign%23"><span class="hs-identifier hs-var">integerToBigNatSign#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679032975"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-399"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032968"><span class="annot"><span class="annottext">sza :: Int#
</span><a href="#local-6989586621679032968"><span class="hs-identifier hs-var hs-var">sza</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032971"><span class="hs-identifier hs-var">ba</span></a></span><span>
</span><span id="line-400"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032967"><span class="annot"><span class="annottext">szb :: Int#
</span><a href="#local-6989586621679032967"><span class="hs-identifier hs-var hs-var">szb</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032969"><span class="hs-identifier hs-var">bb</span></a></span><span>
</span><span id="line-401"></span><span>      </span><span class="hs-comment">-- signed sizes of a and b</span><span>
</span><span id="line-402"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032966"><span class="annot"><span class="annottext">ssa :: Int#
</span><a href="#local-6989586621679032966"><span class="hs-identifier hs-var hs-var">ssa</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032972"><span class="hs-identifier hs-var">sa</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-403"></span><span>                           </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032968"><span class="hs-identifier hs-var">sza</span></a></span><span>
</span><span id="line-404"></span><span>                           </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateInt%23"><span class="hs-identifier hs-var">negateInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032968"><span class="hs-identifier hs-var">sza</span></a></span><span>
</span><span id="line-405"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032965"><span class="annot"><span class="annottext">ssb :: Int#
</span><a href="#local-6989586621679032965"><span class="hs-identifier hs-var hs-var">ssb</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032970"><span class="hs-identifier hs-var">sb</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-406"></span><span>                        </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032967"><span class="hs-identifier hs-var">szb</span></a></span><span>
</span><span id="line-407"></span><span>                        </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateInt%23"><span class="hs-identifier hs-var">negateInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032967"><span class="hs-identifier hs-var">szb</span></a></span><span>
</span><span id="line-408"></span><span>
</span><span id="line-409"></span><span>      </span><span class="hs-comment">-- gcd(a,b) &lt; min(a,b)</span><span>
</span><span id="line-410"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032964"><span class="annot"><span class="annottext">g_init_sz :: Int#
</span><a href="#local-6989586621679032964"><span class="hs-identifier hs-var hs-var">g_init_sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="GHC.Num.Primitives.html#minI%23"><span class="hs-identifier hs-var">minI#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032968"><span class="hs-identifier hs-var">sza</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032967"><span class="hs-identifier hs-var">szb</span></a></span><span>
</span><span id="line-411"></span><span>
</span><span id="line-412"></span><span>      </span><span class="hs-comment">-- According to https://gmplib.org/manual/Number-Theoretic-Functions.html#index-mpz_005fgcdext</span><span>
</span><span id="line-413"></span><span>      </span><span class="hs-comment">-- a*x + b*y = g</span><span>
</span><span id="line-414"></span><span>      </span><span class="hs-comment">-- abs(x) &lt; abs(b) / (2 g) &lt; abs(b)</span><span>
</span><span id="line-415"></span><span>      </span><span class="hs-comment">-- abs(y) &lt; abs(a) / (2 g) &lt; abs(a)</span><span>
</span><span id="line-416"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032963"><span class="annot"><span class="annottext">x_init_sz :: Int#
</span><a href="#local-6989586621679032963"><span class="hs-identifier hs-var hs-var">x_init_sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032967"><span class="hs-identifier hs-var">szb</span></a></span><span>
</span><span id="line-417"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032962"><span class="annot"><span class="annottext">y_init_sz :: Int#
</span><a href="#local-6989586621679032962"><span class="hs-identifier hs-var hs-var">y_init_sz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032968"><span class="hs-identifier hs-var">sza</span></a></span><span>
</span><span id="line-418"></span><span>
</span><span id="line-419"></span><span>      </span><span id="local-6989586621679032974"><span class="annot"><span class="annottext">io :: State# RealWorld
-&gt; (# State# RealWorld, (# Integer, Integer, Integer #) #)
</span><a href="#local-6989586621679032974"><span class="hs-identifier hs-var hs-var">io</span></a></span></span><span> </span><span id="local-6989586621679032961"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032961"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-420"></span><span>         </span><span class="hs-comment">-- allocate output arrays</span><span>
</span><span id="line-421"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, MutableWordArray# RealWorld #)
forall s. Int# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="GHC.Num.WordArray.html#newWordArray%23"><span class="hs-identifier hs-var">newWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032964"><span class="hs-identifier hs-var">g_init_sz</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032961"><span class="hs-identifier hs-var">s</span></a></span><span>     </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032959"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032959"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032958"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032958"><span class="hs-identifier hs-var">mbg</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-422"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, MutableWordArray# RealWorld #)
forall s. Int# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="GHC.Num.WordArray.html#newWordArray%23"><span class="hs-identifier hs-var">newWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032963"><span class="hs-identifier hs-var">x_init_sz</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032959"><span class="hs-identifier hs-var">s</span></a></span><span>     </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032957"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032957"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032956"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032956"><span class="hs-identifier hs-var">mbx</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-423"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, MutableWordArray# RealWorld #)
forall s. Int# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="GHC.Num.WordArray.html#newWordArray%23"><span class="hs-identifier hs-var">newWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032962"><span class="hs-identifier hs-var">y_init_sz</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032957"><span class="hs-identifier hs-var">s</span></a></span><span>     </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032955"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032955"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032954"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032954"><span class="hs-identifier hs-var">mby</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-424"></span><span>         </span><span class="hs-comment">-- allocate space to return sizes (3x4 = 12)</span><span>
</span><span id="line-425"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, MutableWordArray# RealWorld #)
forall s. Int# -&gt; State# s -&gt; (# State# s, MutableWordArray# s #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#newPinnedByteArray%23"><span class="hs-identifier hs-var">newPinnedByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">12#</span></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032955"><span class="hs-identifier hs-var">s</span></a></span><span>     </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032953"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032953"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032952"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032952"><span class="hs-identifier hs-var">mszs</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-426"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; State# RealWorld -&gt; (# State# RealWorld, WordArray# #)
forall d.
MutableByteArray# d -&gt; State# d -&gt; (# State# d, WordArray# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#unsafeFreezeByteArray%23"><span class="hs-identifier hs-var">unsafeFreezeByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032952"><span class="hs-identifier hs-var">mszs</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032953"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032951"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032951"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032950"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032950"><span class="hs-identifier hs-var">szs</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-427"></span><span>         </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679032949"><span class="annot"><span class="annottext">ssx_ptr :: Addr#
</span><a href="#local-6989586621679032949"><span class="hs-identifier hs-var hs-var">ssx_ptr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Addr#
</span><a href="../../ghc-prim/src/GHC.Prim.html#byteArrayContents%23"><span class="hs-identifier hs-var">byteArrayContents#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032950"><span class="hs-identifier hs-var">szs</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-428"></span><span>         </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679032948"><span class="annot"><span class="annottext">ssy_ptr :: Addr#
</span><a href="#local-6989586621679032948"><span class="hs-identifier hs-var hs-var">ssy_ptr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032949"><span class="hs-identifier hs-var">ssx_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Int# -&gt; Addr#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusAddr%23"><span class="hs-operator hs-var">`plusAddr#`</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">4#</span></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-429"></span><span>         </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679032947"><span class="annot"><span class="annottext">sg_ptr :: Addr#
</span><a href="#local-6989586621679032947"><span class="hs-identifier hs-var hs-var">sg_ptr</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032948"><span class="hs-identifier hs-var">ssy_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Int# -&gt; Addr#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusAddr%23"><span class="hs-operator hs-var">`plusAddr#`</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">4#</span></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-430"></span><span>         </span><span class="hs-comment">-- call GMP</span><span>
</span><span id="line-431"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; State# RealWorld -&gt; State# RealWorld
forall a. IO a -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier hs-var">ioVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Addr#
-&gt; MutableWordArray# RealWorld
-&gt; Addr#
-&gt; MutableWordArray# RealWorld
-&gt; Addr#
-&gt; WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; IO ()
forall s.
MutableByteArray# s
-&gt; Addr#
-&gt; MutableByteArray# s
-&gt; Addr#
-&gt; MutableByteArray# s
-&gt; Addr#
-&gt; WordArray#
-&gt; Int#
-&gt; WordArray#
-&gt; Int#
-&gt; IO ()
</span><a href="GHC.Num.Backend.GMP.html#integer_gmp_gcdext%23"><span class="hs-identifier hs-var">integer_gmp_gcdext#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032956"><span class="hs-identifier hs-var">mbx</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032949"><span class="hs-identifier hs-var">ssx_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032954"><span class="hs-identifier hs-var">mby</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032948"><span class="hs-identifier hs-var">ssy_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032958"><span class="hs-identifier hs-var">mbg</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032947"><span class="hs-identifier hs-var">sg_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032971"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032966"><span class="hs-identifier hs-var">ssa</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032969"><span class="hs-identifier hs-var">bb</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032965"><span class="hs-identifier hs-var">ssb</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032951"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679032945"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032945"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-432"></span><span>         </span><span class="hs-comment">-- read sizes</span><span>
</span><span id="line-433"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Int# -&gt; State# RealWorld -&gt; (# State# RealWorld, Int# #)
forall d. Addr# -&gt; Int# -&gt; State# d -&gt; (# State# d, Int# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#readInt32OffAddr%23"><span class="hs-identifier hs-var">readInt32OffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032949"><span class="hs-identifier hs-var">ssx_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032945"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032944"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032944"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032943"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032943"><span class="hs-identifier hs-var">ssx</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-434"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Int# -&gt; State# RealWorld -&gt; (# State# RealWorld, Int# #)
forall d. Addr# -&gt; Int# -&gt; State# d -&gt; (# State# d, Int# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#readInt32OffAddr%23"><span class="hs-identifier hs-var">readInt32OffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032948"><span class="hs-identifier hs-var">ssy_ptr</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032944"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032942"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032942"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032941"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032941"><span class="hs-identifier hs-var">ssy</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-435"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Int# -&gt; State# RealWorld -&gt; (# State# RealWorld, Int# #)
forall d. Addr# -&gt; Int# -&gt; State# d -&gt; (# State# d, Int# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#readInt32OffAddr%23"><span class="hs-identifier hs-var">readInt32OffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032947"><span class="hs-identifier hs-var">sg_ptr</span></a></span><span>  </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032942"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032940"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032940"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032939"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032939"><span class="hs-identifier hs-var">sg</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-436"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="../../ghc-prim/src/GHC.Prim.html#touch%23"><span class="hs-identifier hs-var">touch#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032950"><span class="hs-identifier hs-var">szs</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032940"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679032938"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032938"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-437"></span><span>         </span><span class="hs-comment">-- shrink x, y and g to their actual sizes and freeze them</span><span>
</span><span id="line-438"></span><span>         </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679032937"><span class="annot"><span class="annottext">sx :: Int#
</span><a href="#local-6989586621679032937"><span class="hs-identifier hs-var hs-var">sx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="GHC.Num.Primitives.html#absI%23"><span class="hs-identifier hs-var">absI#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032943"><span class="hs-identifier hs-var">ssx</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-439"></span><span>         </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679032935"><span class="annot"><span class="annottext">sy :: Int#
</span><a href="#local-6989586621679032935"><span class="hs-identifier hs-var hs-var">sy</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="GHC.Num.Primitives.html#absI%23"><span class="hs-identifier hs-var">absI#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032941"><span class="hs-identifier hs-var">ssy</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-440"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableByteArray# s -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaSetSize%23"><span class="hs-identifier hs-var">mwaSetSize#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032956"><span class="hs-identifier hs-var">mbx</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032937"><span class="hs-identifier hs-var">sx</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032938"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679032934"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032934"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-441"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableByteArray# s -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaSetSize%23"><span class="hs-identifier hs-var">mwaSetSize#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032954"><span class="hs-identifier hs-var">mby</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032935"><span class="hs-identifier hs-var">sy</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032934"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679032933"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032933"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-442"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableByteArray# s -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaSetSize%23"><span class="hs-identifier hs-var">mwaSetSize#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032958"><span class="hs-identifier hs-var">mbg</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032939"><span class="hs-identifier hs-var">sg</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032933"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679032932"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032932"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-443"></span><span>
</span><span id="line-444"></span><span>         </span><span class="hs-comment">-- return x, y and g as Integer</span><span>
</span><span id="line-445"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; State# RealWorld -&gt; (# State# RealWorld, WordArray# #)
forall d.
MutableByteArray# d -&gt; State# d -&gt; (# State# d, WordArray# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#unsafeFreezeByteArray%23"><span class="hs-identifier hs-var">unsafeFreezeByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032956"><span class="hs-identifier hs-var">mbx</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032932"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032931"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032931"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032930"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032930"><span class="hs-identifier hs-var">bx</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-446"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; State# RealWorld -&gt; (# State# RealWorld, WordArray# #)
forall d.
MutableByteArray# d -&gt; State# d -&gt; (# State# d, WordArray# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#unsafeFreezeByteArray%23"><span class="hs-identifier hs-var">unsafeFreezeByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032954"><span class="hs-identifier hs-var">mby</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032931"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032929"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032929"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032928"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032928"><span class="hs-identifier hs-var">by</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-447"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; State# RealWorld -&gt; (# State# RealWorld, WordArray# #)
forall d.
MutableByteArray# d -&gt; State# d -&gt; (# State# d, WordArray# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#unsafeFreezeByteArray%23"><span class="hs-identifier hs-var">unsafeFreezeByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032958"><span class="hs-identifier hs-var">mbg</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032929"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032927"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032927"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032926"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032926"><span class="hs-identifier hs-var">bg</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-448"></span><span>
</span><span id="line-449"></span><span>         </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032927"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerFromBigNat%23"><span class="hs-identifier hs-var">integerFromBigNat#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032926"><span class="hs-identifier hs-var">bg</span></a></span><span>
</span><span id="line-450"></span><span>               </span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">Int# -&gt; WordArray# -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerFromBigNatSign%23"><span class="hs-identifier hs-var">integerFromBigNatSign#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032943"><span class="hs-identifier hs-var">ssx</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032930"><span class="hs-identifier hs-var">bx</span></a></span><span>
</span><span id="line-451"></span><span>               </span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">Int# -&gt; WordArray# -&gt; Integer
</span><a href="GHC.Num.Integer.html#integerFromBigNatSign%23"><span class="hs-identifier hs-var">integerFromBigNatSign#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032941"><span class="hs-identifier hs-var">ssy</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032928"><span class="hs-identifier hs-var">by</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-452"></span><span>         </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span>
</span><span id="line-453"></span><span>
</span><span id="line-454"></span><span>
</span><span id="line-455"></span><span>
</span><span id="line-456"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#integer_recip_mod"><span class="hs-identifier hs-type">integer_recip_mod</span></a></span><span>
</span><span id="line-457"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-458"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html#Natural"><span class="hs-identifier hs-type">Natural</span></a></span><span>
</span><span id="line-459"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="GHC.Num.Natural.html#Natural"><span class="hs-identifier hs-type">Natural</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-460"></span><span id="integer_recip_mod"><span class="annot"><span class="annottext">integer_recip_mod :: Integer -&gt; Natural -&gt; (# Natural | () #)
</span><a href="GHC.Num.Backend.GMP.html#integer_recip_mod"><span class="hs-identifier hs-var hs-var">integer_recip_mod</span></a></span></span><span> </span><span id="local-6989586621679032922"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679032922"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679032921"><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679032921"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-461"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-462"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span>  </span><span id="local-6989586621679032920"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032920"><span class="hs-identifier hs-var">sign_x</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032919"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032919"><span class="hs-identifier hs-var">bx</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; (# Int#, WordArray# #)
</span><a href="GHC.Num.Integer.html#integerToBigNatSign%23"><span class="hs-identifier hs-var">integerToBigNatSign#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679032922"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-463"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032918"><span class="annot"><span class="annottext">bm :: WordArray#
</span><a href="#local-6989586621679032918"><span class="hs-identifier hs-var hs-var">bm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Natural -&gt; WordArray#
</span><a href="GHC.Num.Natural.html#naturalToBigNat%23"><span class="hs-identifier hs-var">naturalToBigNat#</span></a></span><span> </span><span class="annot"><span class="annottext">Natural
</span><a href="#local-6989586621679032921"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-464"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032917"><span class="annot"><span class="annottext">br :: WordArray#
</span><a href="#local-6989586621679032917"><span class="hs-identifier hs-var hs-var">br</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; WordArray# -&gt; WordArray# -&gt; WordArray#
</span><a href="GHC.Num.Backend.GMP.html#sbignat_recip_mod"><span class="hs-identifier hs-var">sbignat_recip_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032920"><span class="hs-identifier hs-var">sign_x</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032919"><span class="hs-identifier hs-var">bx</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032918"><span class="hs-identifier hs-var">bm</span></a></span><span>
</span><span id="line-465"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.BigNat.html#bigNatIsZero%23"><span class="hs-identifier hs-var">bigNatIsZero#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032917"><span class="hs-identifier hs-var">br</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-466"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-467"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Natural
</span><a href="GHC.Num.Natural.html#naturalFromBigNat%23"><span class="hs-identifier hs-var">naturalFromBigNat#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032917"><span class="hs-identifier hs-var">br</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-468"></span><span>
</span><span id="line-469"></span><span>
</span><span id="line-470"></span><span class="hs-comment">-- | Return 0 for invalid inputs</span><span>
</span><span id="line-471"></span><span class="annot"><a href="GHC.Num.Backend.GMP.html#sbignat_recip_mod"><span class="hs-identifier hs-type">sbignat_recip_mod</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.BigNat.html#BigNat%23"><span class="hs-identifier hs-type">BigNat#</span></a></span><span>
</span><span id="line-472"></span><span id="sbignat_recip_mod"><span class="annot"><span class="annottext">sbignat_recip_mod :: Int# -&gt; WordArray# -&gt; WordArray# -&gt; WordArray#
</span><a href="GHC.Num.Backend.GMP.html#sbignat_recip_mod"><span class="hs-identifier hs-var hs-var">sbignat_recip_mod</span></a></span></span><span> </span><span id="local-6989586621679032913"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032913"><span class="hs-identifier hs-var">sign_x</span></a></span></span><span> </span><span id="local-6989586621679032912"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032912"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679032911"><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032911"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; (MutableWordArray# RealWorld
    -&gt; State# RealWorld -&gt; State# RealWorld)
-&gt; WordArray#
</span><a href="GHC.Num.WordArray.html#withNewWordArray%23"><span class="hs-identifier hs-var">withNewWordArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032910"><span class="hs-identifier hs-var">szm</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679032909"><span class="hs-identifier hs-var">io</span></a></span><span>
</span><span id="line-473"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-474"></span><span>    </span><span id="local-6989586621679032909"><span class="annot"><span class="annottext">io :: MutableWordArray# RealWorld -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="#local-6989586621679032909"><span class="hs-identifier hs-var hs-var">io</span></a></span></span><span> </span><span id="local-6989586621679032908"><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032908"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679032907"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032907"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IO Int -&gt; State# RealWorld -&gt; (# State# RealWorld, Int# #)
</span><a href="GHC.Num.Primitives.html#ioInt%23"><span class="hs-identifier hs-var">ioInt#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; WordArray# -&gt; Int# -&gt; WordArray# -&gt; Int# -&gt; IO Int
</span><a href="GHC.Num.Backend.GMP.html#integer_gmp_invert%23"><span class="hs-identifier hs-var">integer_gmp_invert#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032908"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032912"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032905"><span class="hs-identifier hs-var">ssx</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032911"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032910"><span class="hs-identifier hs-var">szm</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032907"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-475"></span><span>               </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032904"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032904"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032903"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032903"><span class="hs-identifier hs-var">rn</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
-&gt; Int# -&gt; State# RealWorld -&gt; State# RealWorld
forall s. MutableByteArray# s -&gt; Int# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.WordArray.html#mwaSetSize%23"><span class="hs-identifier hs-var">mwaSetSize#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableWordArray# RealWorld
</span><a href="#local-6989586621679032908"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="GHC.Num.Backend.GMP.html#narrowGmpSize%23"><span class="hs-identifier hs-var">narrowGmpSize#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032903"><span class="hs-identifier hs-var">rn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032904"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-476"></span><span>    </span><span class="hs-glyph">!</span><span id="local-6989586621679032902"><span class="annot"><span class="annottext">szx :: Int#
</span><a href="#local-6989586621679032902"><span class="hs-identifier hs-var hs-var">szx</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032912"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-477"></span><span>    </span><span class="hs-glyph">!</span><span id="local-6989586621679032910"><span class="annot"><span class="annottext">szm :: Int#
</span><a href="#local-6989586621679032910"><span class="hs-identifier hs-var hs-var">szm</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WordArray# -&gt; Int#
</span><a href="GHC.Num.BigNat.html#bigNatSize%23"><span class="hs-identifier hs-var">bigNatSize#</span></a></span><span> </span><span class="annot"><span class="annottext">WordArray#
</span><a href="#local-6989586621679032911"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-478"></span><span>    </span><span class="hs-glyph">!</span><span id="local-6989586621679032905"><span class="annot"><span class="annottext">ssx :: Int#
</span><a href="#local-6989586621679032905"><span class="hs-identifier hs-var hs-var">ssx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032913"><span class="hs-identifier hs-var">sign_x</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-comment">-- signed size of x</span><span>
</span><span id="line-479"></span><span>            </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032902"><span class="hs-identifier hs-var">szx</span></a></span><span>
</span><span id="line-480"></span><span>            </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateInt%23"><span class="hs-identifier hs-var">negateInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679032902"><span class="hs-identifier hs-var">szx</span></a></span><span>
</span><span id="line-481"></span><span>
</span><span id="line-482"></span><span class="hs-comment">----------------------------------------------------------------------</span><span>
</span><span id="line-483"></span><span class="hs-comment">-- FFI ccall imports</span><span>
</span><span id="line-484"></span><span>
</span><span id="line-485"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_gcd_word&quot;</span></span><span>
</span><span id="line-486"></span><span>  </span><span id="integer_gmp_gcd_word"><span class="annot"><a href="GHC.Num.Backend.GMP.html#integer_gmp_gcd_word"><span class="hs-identifier hs-var">integer_gmp_gcd_word</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span>
</span><span id="line-487"></span><span>
</span><span id="line-488"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_gcd_1&quot;</span></span><span>
</span><span id="line-489"></span><span>  </span><span id="c_mpn_gcd_1%23"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_gcd_1%23"><span class="hs-identifier hs-var">c_mpn_gcd_1#</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span>
</span><span id="line-490"></span><span>
</span><span id="line-491"></span><span id="local-6989586621679033232"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_gcd&quot;</span></span><span>
</span><span id="line-492"></span><span>  </span><span id="c_mpn_gcd%23"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_gcd%23"><span class="hs-identifier hs-var">c_mpn_gcd#</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033232"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-493"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize"><span class="hs-identifier hs-type">GmpSize</span></a></span></span><span>
</span><span id="line-494"></span><span>
</span><span id="line-495"></span><span id="local-6989586621679033226"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_gcdext&quot;</span></span><span> </span><span id="integer_gmp_gcdext%23"><span class="annot"><a href="GHC.Num.Backend.GMP.html#integer_gmp_gcdext%23"><span class="hs-identifier hs-var">integer_gmp_gcdext#</span></a></span></span><span>
</span><span id="line-496"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033226"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span>
</span><span id="line-497"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033226"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span>
</span><span id="line-498"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033226"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span>
</span><span id="line-499"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-500"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-501"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-502"></span><span>
</span><span id="line-503"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_invert&quot;</span></span><span>
</span><span id="line-504"></span><span>  </span><span id="integer_gmp_invert%23"><span class="annot"><a href="GHC.Num.Backend.GMP.html#integer_gmp_invert%23"><span class="hs-identifier hs-var">integer_gmp_invert#</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-505"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-506"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize"><span class="hs-identifier hs-type">GmpSize</span></a></span><span>
</span><span id="line-507"></span><span>
</span><span id="line-508"></span><span class="hs-comment">-- mp_limb_t mpn_add_1 (mp_limb_t *rp, const mp_limb_t *s1p, mp_size_t n,</span><span>
</span><span id="line-509"></span><span class="hs-comment">--                      mp_limb_t s2limb)</span><span>
</span><span id="line-510"></span><span id="local-6989586621679033239"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;gmp.h __gmpn_add_1&quot;</span></span><span>
</span><span id="line-511"></span><span>  </span><span id="c_mpn_add_1"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_add_1"><span class="hs-identifier hs-var">c_mpn_add_1</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033239"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span>
</span><span id="line-512"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb"><span class="hs-identifier hs-type">GmpLimb</span></a></span></span><span>
</span><span id="line-513"></span><span>
</span><span id="line-514"></span><span class="hs-comment">-- mp_limb_t mpn_sub_1 (mp_limb_t *rp, const mp_limb_t *s1p, mp_size_t n,</span><span>
</span><span id="line-515"></span><span class="hs-comment">--                      mp_limb_t s2limb)</span><span>
</span><span id="line-516"></span><span id="local-6989586621679032901"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;gmp.h __gmpn_sub_1&quot;</span></span><span>
</span><span id="line-517"></span><span>  </span><span id="c_mpn_sub_1"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_sub_1"><span class="hs-identifier hs-var">c_mpn_sub_1</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032901"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span>
</span><span id="line-518"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb"><span class="hs-identifier hs-type">GmpLimb</span></a></span></span><span>
</span><span id="line-519"></span><span>
</span><span id="line-520"></span><span class="hs-comment">-- mp_limb_t mpn_mul_1 (mp_limb_t *rp, const mp_limb_t *s1p, mp_size_t n,</span><span>
</span><span id="line-521"></span><span class="hs-comment">--                      mp_limb_t s2limb)</span><span>
</span><span id="line-522"></span><span id="local-6989586621679032900"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;gmp.h __gmpn_mul_1&quot;</span></span><span>
</span><span id="line-523"></span><span>  </span><span id="c_mpn_mul_1"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_mul_1"><span class="hs-identifier hs-var">c_mpn_mul_1</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032900"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span>
</span><span id="line-524"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb"><span class="hs-identifier hs-type">GmpLimb</span></a></span></span><span>
</span><span id="line-525"></span><span>
</span><span id="line-526"></span><span class="hs-comment">-- mp_limb_t mpn_add (mp_limb_t *rp, const mp_limb_t *s1p, mp_size_t s1n,</span><span>
</span><span id="line-527"></span><span class="hs-comment">--                    const mp_limb_t *s2p, mp_size_t s2n)</span><span>
</span><span id="line-528"></span><span id="local-6989586621679033241"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;gmp.h __gmpn_add&quot;</span></span><span>
</span><span id="line-529"></span><span>  </span><span id="c_mpn_add"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_add"><span class="hs-identifier hs-var">c_mpn_add</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033241"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-530"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb"><span class="hs-identifier hs-type">GmpLimb</span></a></span></span><span>
</span><span id="line-531"></span><span>
</span><span id="line-532"></span><span class="hs-comment">-- mp_limb_t mpn_sub (mp_limb_t *rp, const mp_limb_t *s1p, mp_size_t s1n,</span><span>
</span><span id="line-533"></span><span class="hs-comment">--                    const mp_limb_t *s2p, mp_size_t s2n)</span><span>
</span><span id="line-534"></span><span id="local-6989586621679032899"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;gmp.h __gmpn_sub&quot;</span></span><span>
</span><span id="line-535"></span><span>  </span><span id="c_mpn_sub"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_sub"><span class="hs-identifier hs-var">c_mpn_sub</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032899"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span>
</span><span id="line-536"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb"><span class="hs-identifier hs-type">GmpLimb</span></a></span></span><span>
</span><span id="line-537"></span><span>
</span><span id="line-538"></span><span class="hs-comment">-- mp_limb_t mpn_mul (mp_limb_t *rp, const mp_limb_t *s1p, mp_size_t s1n,</span><span>
</span><span id="line-539"></span><span class="hs-comment">--                    const mp_limb_t *s2p, mp_size_t s2n)</span><span>
</span><span id="line-540"></span><span id="local-6989586621679032898"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;gmp.h __gmpn_mul&quot;</span></span><span>
</span><span id="line-541"></span><span>  </span><span id="c_mpn_mul"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_mul"><span class="hs-identifier hs-var">c_mpn_mul</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032898"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span>
</span><span id="line-542"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb"><span class="hs-identifier hs-type">GmpLimb</span></a></span></span><span>
</span><span id="line-543"></span><span>
</span><span id="line-544"></span><span class="hs-comment">-- int mpn_cmp (const mp_limb_t *s1p, const mp_limb_t *s2p, mp_size_t n)</span><span>
</span><span id="line-545"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;gmp.h __gmpn_cmp&quot;</span></span><span>
</span><span id="line-546"></span><span>  </span><span id="c_mpn_cmp"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_cmp"><span class="hs-identifier hs-var">c_mpn_cmp</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-547"></span><span>
</span><span id="line-548"></span><span class="hs-comment">-- void mpn_tdiv_qr (mp_limb_t *qp, mp_limb_t *rp, mp_size_t qxn,</span><span>
</span><span id="line-549"></span><span class="hs-comment">--                   const mp_limb_t *np, mp_size_t nn,</span><span>
</span><span id="line-550"></span><span class="hs-comment">--                   const mp_limb_t *dp, mp_size_t dn)</span><span>
</span><span id="line-551"></span><span id="local-6989586621679033235"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;gmp.h __gmpn_tdiv_qr&quot;</span></span><span>
</span><span id="line-552"></span><span>  </span><span id="c_mpn_tdiv_qr"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_tdiv_qr"><span class="hs-identifier hs-var">c_mpn_tdiv_qr</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033235"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033235"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-553"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-554"></span><span>
</span><span id="line-555"></span><span id="local-6989586621679033234"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_tdiv_q&quot;</span></span><span>
</span><span id="line-556"></span><span>  </span><span id="c_mpn_tdiv_q"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_tdiv_q"><span class="hs-identifier hs-var">c_mpn_tdiv_q</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033234"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span>
</span><span id="line-557"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-558"></span><span>
</span><span id="line-559"></span><span id="local-6989586621679032897"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_tdiv_r&quot;</span></span><span>
</span><span id="line-560"></span><span>  </span><span id="c_mpn_tdiv_r"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_tdiv_r"><span class="hs-identifier hs-var">c_mpn_tdiv_r</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032897"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span>
</span><span id="line-561"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-562"></span><span>
</span><span id="line-563"></span><span class="hs-comment">-- mp_limb_t mpn_divrem_1 (mp_limb_t *r1p, mp_size_t qxn, mp_limb_t *s2p,</span><span>
</span><span id="line-564"></span><span class="hs-comment">--                         mp_size_t s2n, mp_limb_t s3limb)</span><span>
</span><span id="line-565"></span><span id="local-6989586621679033233"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;gmp.h __gmpn_divrem_1&quot;</span></span><span>
</span><span id="line-566"></span><span>  </span><span id="c_mpn_divrem_1"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_divrem_1"><span class="hs-identifier hs-var">c_mpn_divrem_1</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033233"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-567"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb"><span class="hs-identifier hs-type">GmpLimb</span></a></span></span><span>
</span><span id="line-568"></span><span>
</span><span id="line-569"></span><span class="hs-comment">-- mp_limb_t mpn_mod_1 (const mp_limb_t *s1p, mp_size_t s1n, mp_limb_t s2limb)</span><span>
</span><span id="line-570"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;gmp.h __gmpn_mod_1&quot;</span></span><span>
</span><span id="line-571"></span><span>  </span><span id="c_mpn_mod_1"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_mod_1"><span class="hs-identifier hs-var">c_mpn_mod_1</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span>
</span><span id="line-572"></span><span>
</span><span id="line-573"></span><span class="hs-comment">-- mp_limb_t integer_gmp_mpn_rshift (mp_limb_t rp[], const mp_limb_t sp[],</span><span>
</span><span id="line-574"></span><span class="hs-comment">--                                   mp_size_t sn, mp_bitcnt_t count)</span><span>
</span><span id="line-575"></span><span id="local-6989586621679032896"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_rshift&quot;</span></span><span>
</span><span id="line-576"></span><span>  </span><span id="c_mpn_rshift"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_rshift"><span class="hs-identifier hs-var">c_mpn_rshift</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032896"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-577"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb"><span class="hs-identifier hs-type">GmpLimb</span></a></span></span><span>
</span><span id="line-578"></span><span>
</span><span id="line-579"></span><span class="hs-comment">-- mp_limb_t integer_gmp_mpn_rshift (mp_limb_t rp[], const mp_limb_t sp[],</span><span>
</span><span id="line-580"></span><span class="hs-comment">--                                   mp_size_t sn, mp_bitcnt_t count)</span><span>
</span><span id="line-581"></span><span id="local-6989586621679032895"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_rshift_2c&quot;</span></span><span>
</span><span id="line-582"></span><span>  </span><span id="c_mpn_rshift_2c"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_rshift_2c"><span class="hs-identifier hs-var">c_mpn_rshift_2c</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032895"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-583"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb"><span class="hs-identifier hs-type">GmpLimb</span></a></span></span><span>
</span><span id="line-584"></span><span>
</span><span id="line-585"></span><span class="hs-comment">-- mp_limb_t integer_gmp_mpn_lshift (mp_limb_t rp[], const mp_limb_t sp[],</span><span>
</span><span id="line-586"></span><span class="hs-comment">--                                   mp_size_t sn, mp_bitcnt_t count)</span><span>
</span><span id="line-587"></span><span id="local-6989586621679032894"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_lshift&quot;</span></span><span>
</span><span id="line-588"></span><span>  </span><span id="c_mpn_lshift"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_lshift"><span class="hs-identifier hs-var">c_mpn_lshift</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032894"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-589"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb"><span class="hs-identifier hs-type">GmpLimb</span></a></span></span><span>
</span><span id="line-590"></span><span>
</span><span id="line-591"></span><span class="hs-comment">-- void mpn_and_n (mp_limb_t *rp, const mp_limb_t *s1p, const mp_limb_t *s2p,</span><span>
</span><span id="line-592"></span><span class="hs-comment">--                 mp_size_t n)</span><span>
</span><span id="line-593"></span><span id="local-6989586621679032893"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_and_n&quot;</span></span><span>
</span><span id="line-594"></span><span>  </span><span id="c_mpn_and_n"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_and_n"><span class="hs-identifier hs-var">c_mpn_and_n</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032893"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-595"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-596"></span><span>
</span><span id="line-597"></span><span class="hs-comment">-- void mpn_andn_n (mp_limb_t *rp, const mp_limb_t *s1p, const mp_limb_t *s2p,</span><span>
</span><span id="line-598"></span><span class="hs-comment">--                  mp_size_t n)</span><span>
</span><span id="line-599"></span><span id="local-6989586621679032892"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_andn_n&quot;</span></span><span>
</span><span id="line-600"></span><span>  </span><span id="c_mpn_andn_n"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_andn_n"><span class="hs-identifier hs-var">c_mpn_andn_n</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032892"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-601"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-602"></span><span>
</span><span id="line-603"></span><span class="hs-comment">-- void mpn_ior_n (mp_limb_t *rp, const mp_limb_t *s1p, const mp_limb_t *s2p,</span><span>
</span><span id="line-604"></span><span class="hs-comment">--                 mp_size_t n)</span><span>
</span><span id="line-605"></span><span id="local-6989586621679033237"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_ior_n&quot;</span></span><span>
</span><span id="line-606"></span><span>  </span><span id="c_mpn_ior_n"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_ior_n"><span class="hs-identifier hs-var">c_mpn_ior_n</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679033237"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-607"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-608"></span><span>
</span><span id="line-609"></span><span class="hs-comment">-- void mpn_xor_n (mp_limb_t *rp, const mp_limb_t *s1p, const mp_limb_t *s2p,</span><span>
</span><span id="line-610"></span><span class="hs-comment">--                 mp_size_t n)</span><span>
</span><span id="line-611"></span><span id="local-6989586621679032891"><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_xor_n&quot;</span></span><span>
</span><span id="line-612"></span><span>  </span><span id="c_mpn_xor_n"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_xor_n"><span class="hs-identifier hs-var">c_mpn_xor_n</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032891"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-613"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-614"></span><span>
</span><span id="line-615"></span><span class="hs-comment">-- mp_bitcnt_t mpn_popcount (const mp_limb_t *s1p, mp_size_t n)</span><span>
</span><span id="line-616"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;gmp.h __gmpn_popcount&quot;</span></span><span>
</span><span id="line-617"></span><span>  </span><span id="c_mpn_popcount"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_popcount"><span class="hs-identifier hs-var">c_mpn_popcount</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-618"></span><span>
</span><span id="line-619"></span><span class="hs-comment">-- double integer_gmp_mpn_get_d (const mp_limb_t sp[], const mp_size_t sn)</span><span>
</span><span id="line-620"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_mpn_get_d&quot;</span></span><span>
</span><span id="line-621"></span><span>  </span><span id="c_mpn_get_d"><span class="annot"><a href="GHC.Num.Backend.GMP.html#c_mpn_get_d"><span class="hs-identifier hs-var">c_mpn_get_d</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Double%23"><span class="hs-identifier hs-type">Double#</span></a></span><span>
</span><span id="line-622"></span><span>
</span><span id="line-623"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_powm&quot;</span></span><span>
</span><span id="line-624"></span><span>  </span><span id="integer_gmp_powm%23"><span class="annot"><a href="GHC.Num.Backend.GMP.html#integer_gmp_powm%23"><span class="hs-identifier hs-var">integer_gmp_powm#</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span>
</span><span id="line-625"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-626"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize"><span class="hs-identifier hs-type">GmpSize</span></a></span><span>
</span><span id="line-627"></span><span>
</span><span id="line-628"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_powm_word&quot;</span></span><span>
</span><span id="line-629"></span><span>  </span><span id="integer_gmp_powm_word"><span class="annot"><a href="GHC.Num.Backend.GMP.html#integer_gmp_powm_word"><span class="hs-identifier hs-var">integer_gmp_powm_word</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span>
</span><span id="line-630"></span><span>
</span><span id="line-631"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;integer_gmp_powm1&quot;</span></span><span>
</span><span id="line-632"></span><span>  </span><span id="integer_gmp_powm1%23"><span class="annot"><a href="GHC.Num.Backend.GMP.html#integer_gmp_powm1%23"><span class="hs-identifier hs-var">integer_gmp_powm1#</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpSize%23"><span class="hs-identifier hs-type">GmpSize#</span></a></span><span>
</span><span id="line-633"></span><span>                        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Backend.GMP.html#GmpLimb%23"><span class="hs-identifier hs-type">GmpLimb#</span></a></span><span>
</span><span id="line-634"></span></pre></body></html>